/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Availability-Monitoring-APIs
可用性监控相关接口，提供创建、查询、修改、删除可用性监控任务等功能

OpenAPI spec version: v2
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKDetection/DetectionApiModel.h>


@implementation DetectionValidateSiteMonitorAddressResult
-(id) initWithSuc:(NSNumber*) suc { 
    self.suc = suc;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self suc])
    {
        [result setValue:[self suc] forKey:@"suc"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.suc = [dictionary objectForKey:@"suc"];
    return self;
} 

@end
@implementation DetectionTestSiteMonitorResult
-(id) initWithError:(NSString*) error
        msg:(NSString*)msg
        status:(NSNumber*)status { 
    self.error = error;               
    self.msg = msg;               
    self.status = status;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self error])
    {
        [result setValue:[self error] forKey:@"error"];
    }
    if([self msg])
    {
        [result setValue:[self msg] forKey:@"msg"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.error = [dictionary objectForKey:@"error"];
    self.msg = [dictionary objectForKey:@"msg"];
    self.status = [dictionary objectForKey:@"status"];
    return self;
} 

@end
@implementation DetectionEnableSiteMonitorResult
-(id) initWithSuc:(NSNumber*) suc { 
    self.suc = suc;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self suc])
    {
        [result setValue:[self suc] forKey:@"suc"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.suc = [dictionary objectForKey:@"suc"];
    return self;
} 

@end
@implementation DetectionUpdateSiteMonitorResult
-(id) initWithSuc:(NSNumber*) suc { 
    self.suc = suc;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self suc])
    {
        [result setValue:[self suc] forKey:@"suc"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.suc = [dictionary objectForKey:@"suc"];
    return self;
} 

@end
@implementation DetectionGetSiteMonitorDataPointsRequest
-(id) initWithRegion:(NSString *)regionId
idValue:(NSString*)idValue
startTime:(NSString*)startTime
endTime:(NSString*)endTime { 
    self.regionId = regionId;
    self.idValue = idValue;
    self.startTime = startTime;
    self.endTime = endTime;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
idValue:(NSString*)idValue
startTime:(NSString*)startTime
endTime:(NSString*)endTime { 
    self.regionId = regionId;
    self.version = version;
    self.idValue = idValue;
    self.startTime = startTime;
    self.endTime = endTime;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    return self;
} 

@end
@implementation DetectionDeleteSiteMonitorResult
-(id) initWithSuc:(NSNumber*) suc { 
    self.suc = suc;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self suc])
    {
        [result setValue:[self suc] forKey:@"suc"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.suc = [dictionary objectForKey:@"suc"];
    return self;
} 

@end
@implementation DetectionValidateSiteMonitorAddressRequest
-(id) initWithRegion:(NSString *)regionId
address:(NSString*)address { 
    self.regionId = regionId;
    self.address = address;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
address:(NSString*)address { 
    self.regionId = regionId;
    self.version = version;
    self.address = address;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self address])
    {
        [result setValue:[self address] forKey:@"address"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.address = [dictionary objectForKey:@"address"];
    return self;
} 

@end
@implementation DetectionCreateSiteMonitorResult
-(id) initWithId:(NSString*) idValue { 
    self.idValue = idValue;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    return self;
} 

@end
@implementation DetectionUpdateProbeTaskResult
-(id) initWithSuc:(NSNumber*) suc { 
    self.suc = suc;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self suc])
    {
        [result setValue:[self suc] forKey:@"suc"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.suc = [dictionary objectForKey:@"suc"];
    return self;
} 

@end
@implementation DetectionCreateProbeTaskResult
-(id) initWithSuc:(NSNumber*) suc
        taskId:(NSString*)taskId { 
    self.suc = suc;               
    self.taskId = taskId;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self suc])
    {
        [result setValue:[self suc] forKey:@"suc"];
    }
    if([self taskId])
    {
        [result setValue:[self taskId] forKey:@"taskId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.suc = [dictionary objectForKey:@"suc"];
    self.taskId = [dictionary objectForKey:@"taskId"];
    return self;
} 

@end
@implementation DetectionDeleteProbeTaskResult
-(id) initWithSuc:(NSNumber*) suc { 
    self.suc = suc;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self suc])
    {
        [result setValue:[self suc] forKey:@"suc"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.suc = [dictionary objectForKey:@"suc"];
    return self;
} 

@end
@implementation DetectionDeleteProbeTaskRequest
-(id) initWithRegion:(NSString *)regionId
probeTaskIDs:(NSString*)probeTaskIDs { 
    self.regionId = regionId;
    self.probeTaskIDs = probeTaskIDs;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
probeTaskIDs:(NSString*)probeTaskIDs { 
    self.regionId = regionId;
    self.version = version;
    self.probeTaskIDs = probeTaskIDs;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self probeTaskIDs])
    {
        [result setValue:[self probeTaskIDs] forKey:@"probeTaskIDs"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.probeTaskIDs = [dictionary objectForKey:@"probeTaskIDs"];
    return self;
} 

@end
@implementation DetectionDescribeProbeHistoryRequest
-(id) initWithRegion:(NSString *)regionId
startTime:(NSString*)startTime
endTime:(NSString*)endTime
probeTaskID:(NSString*)probeTaskID
probeID:(NSString*)probeID { 
    self.regionId = regionId;
    self.startTime = startTime;
    self.endTime = endTime;
    self.probeTaskID = probeTaskID;
    self.probeID = probeID;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
startTime:(NSString*)startTime
endTime:(NSString*)endTime
probeTaskID:(NSString*)probeTaskID
probeID:(NSString*)probeID { 
    self.regionId = regionId;
    self.version = version;
    self.startTime = startTime;
    self.endTime = endTime;
    self.probeTaskID = probeTaskID;
    self.probeID = probeID;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self probeTaskID])
    {
        [result setValue:[self probeTaskID] forKey:@"probeTaskID"];
    }
    if([self probeID])
    {
        [result setValue:[self probeID] forKey:@"probeID"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.probeTaskID = [dictionary objectForKey:@"probeTaskID"];
    self.probeID = [dictionary objectForKey:@"probeID"];
    return self;
} 

@end
@implementation DetectionDescribeMetricDataAmRequest
-(id) initWithRegion:(NSString *)regionId
resourceId:(NSString*)resourceId
startTime:(NSString*)startTime
endTime:(NSString*)endTime
timeInterval:(NSString*)timeInterval { 
    self.regionId = regionId;
    self.resourceId = resourceId;
    self.startTime = startTime;
    self.endTime = endTime;
    self.timeInterval = timeInterval;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
resourceId:(NSString*)resourceId
startTime:(NSString*)startTime
endTime:(NSString*)endTime
timeInterval:(NSString*)timeInterval { 
    self.regionId = regionId;
    self.version = version;
    self.resourceId = resourceId;
    self.startTime = startTime;
    self.endTime = endTime;
    self.timeInterval = timeInterval;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self timeInterval])
    {
        [result setValue:[self timeInterval] forKey:@"timeInterval"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.timeInterval = [dictionary objectForKey:@"timeInterval"];
    return self;
} 

@end
@implementation DetectionProbeTaskEnableRequest
-(id) initWithRegion:(NSString *)regionId
enabled:(NSNumber*)enabled
taskId:(NSArray<NSString*>*)taskId { 
    self.regionId = regionId;
    self.enabled = enabled;
    self.taskId = taskId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
enabled:(NSNumber*)enabled
taskId:(NSArray<NSString*>*)taskId { 
    self.regionId = regionId;
    self.version = version;
    self.enabled = enabled;
    self.taskId = taskId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self taskId])
    {
        [result setValue:[self taskId] forKey:@"taskId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.taskId = [dictionary objectForKey:@"taskId"];
    return self;
} 

@end
@implementation DetectionDescribeProbeTaskRequest
-(id) initWithRegion:(NSString *)regionId
probeTaskID:(NSString*)probeTaskID { 
    self.regionId = regionId;
    self.probeTaskID = probeTaskID;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
probeTaskID:(NSString*)probeTaskID { 
    self.regionId = regionId;
    self.version = version;
    self.probeTaskID = probeTaskID;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self probeTaskID])
    {
        [result setValue:[self probeTaskID] forKey:@"probeTaskID"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.probeTaskID = [dictionary objectForKey:@"probeTaskID"];
    return self;
} 

@end
@implementation DetectionProbeTaskEnableResult
-(id) initWithSuc:(NSNumber*) suc { 
    self.suc = suc;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self suc])
    {
        [result setValue:[self suc] forKey:@"suc"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.suc = [dictionary objectForKey:@"suc"];
    return self;
} 

@end
@implementation DetectionCreateSiteMonitorRequest
-(id) initWithRegion:(NSString *)regionId
address:(NSString*)address
advanceChecked:(NSString*)advanceChecked
createdTime:(NSNumber*)createdTime
cycle:(NSNumber*)cycle
defaultSource:(NSString*)defaultSource
dnsOption:(SiteMonitorDnsOption*)dnsOption
enabled:(NSString*)enabled
ftpOption:(SiteMonitorFtpOption*)ftpOption
hawkeyeId:(NSNumber*)hawkeyeId
httpOption:(SiteMonitorHttpOption*)httpOption
idValue:(NSString*)idValue
isDeleted:(NSString*)isDeleted
name:(NSString*)name
pin:(NSString*)pin
pingOption:(SiteMonitorPingOption*)pingOption
pop3Option:(SiteMonitorPop3Option*)pop3Option
port:(NSString*)port
smtpOption:(SiteMonitorSmtpOption*)smtpOption
source:(NSArray<SiteMonitorSource*>*)source
stats:(NSMutableDictionary<NSString*,NSObject*>*)stats
taskType:(NSString*)taskType
tcpOption:(SiteMonitorTcpOption*)tcpOption
udpOption:(SiteMonitorUdpOption*)udpOption
updatedTime:(NSNumber*)updatedTime { 
    self.regionId = regionId;
    self.address = address;
    self.advanceChecked = advanceChecked;
    self.createdTime = createdTime;
    self.cycle = cycle;
    self.defaultSource = defaultSource;
    self.dnsOption = dnsOption;
    self.enabled = enabled;
    self.ftpOption = ftpOption;
    self.hawkeyeId = hawkeyeId;
    self.httpOption = httpOption;
    self.idValue = idValue;
    self.isDeleted = isDeleted;
    self.name = name;
    self.pin = pin;
    self.pingOption = pingOption;
    self.pop3Option = pop3Option;
    self.port = port;
    self.smtpOption = smtpOption;
    self.source = source;
    self.stats = stats;
    self.taskType = taskType;
    self.tcpOption = tcpOption;
    self.udpOption = udpOption;
    self.updatedTime = updatedTime;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
address:(NSString*)address
advanceChecked:(NSString*)advanceChecked
createdTime:(NSNumber*)createdTime
cycle:(NSNumber*)cycle
defaultSource:(NSString*)defaultSource
dnsOption:(SiteMonitorDnsOption*)dnsOption
enabled:(NSString*)enabled
ftpOption:(SiteMonitorFtpOption*)ftpOption
hawkeyeId:(NSNumber*)hawkeyeId
httpOption:(SiteMonitorHttpOption*)httpOption
idValue:(NSString*)idValue
isDeleted:(NSString*)isDeleted
name:(NSString*)name
pin:(NSString*)pin
pingOption:(SiteMonitorPingOption*)pingOption
pop3Option:(SiteMonitorPop3Option*)pop3Option
port:(NSString*)port
smtpOption:(SiteMonitorSmtpOption*)smtpOption
source:(NSArray<SiteMonitorSource*>*)source
stats:(NSMutableDictionary<NSString*,NSObject*>*)stats
taskType:(NSString*)taskType
tcpOption:(SiteMonitorTcpOption*)tcpOption
udpOption:(SiteMonitorUdpOption*)udpOption
updatedTime:(NSNumber*)updatedTime { 
    self.regionId = regionId;
    self.version = version;
    self.address = address;
    self.advanceChecked = advanceChecked;
    self.createdTime = createdTime;
    self.cycle = cycle;
    self.defaultSource = defaultSource;
    self.dnsOption = dnsOption;
    self.enabled = enabled;
    self.ftpOption = ftpOption;
    self.hawkeyeId = hawkeyeId;
    self.httpOption = httpOption;
    self.idValue = idValue;
    self.isDeleted = isDeleted;
    self.name = name;
    self.pin = pin;
    self.pingOption = pingOption;
    self.pop3Option = pop3Option;
    self.port = port;
    self.smtpOption = smtpOption;
    self.source = source;
    self.stats = stats;
    self.taskType = taskType;
    self.tcpOption = tcpOption;
    self.udpOption = udpOption;
    self.updatedTime = updatedTime;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self address])
    {
        [result setValue:[self address] forKey:@"address"];
    }
    if([self advanceChecked])
    {
        [result setValue:[self advanceChecked] forKey:@"advanceChecked"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self cycle])
    {
        [result setValue:[self cycle] forKey:@"cycle"];
    }
    if([self defaultSource])
    {
        [result setValue:[self defaultSource] forKey:@"defaultSource"];
    }
    if([self dnsOption])
    {
        [result setValue:[[self dnsOption] dictionary]forKey:@"dnsOption"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self ftpOption])
    {
        [result setValue:[[self ftpOption] dictionary]forKey:@"ftpOption"];
    }
    if([self hawkeyeId])
    {
        [result setValue:[self hawkeyeId] forKey:@"hawkeyeId"];
    }
    if([self httpOption])
    {
        [result setValue:[[self httpOption] dictionary]forKey:@"httpOption"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self isDeleted])
    {
        [result setValue:[self isDeleted] forKey:@"isDeleted"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self pingOption])
    {
        [result setValue:[[self pingOption] dictionary]forKey:@"pingOption"];
    }
    if([self pop3Option])
    {
        [result setValue:[[self pop3Option] dictionary]forKey:@"pop3Option"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self smtpOption])
    {
        [result setValue:[[self smtpOption] dictionary]forKey:@"smtpOption"];
    }
    if([self source])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self source] count]; i++) {
            SiteMonitorSource* item = [[self source] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"source"];
    }
    if([self stats])
    {
        [result setValue:[self stats] forKey:@"stats"];
    }
    if([self taskType])
    {
        [result setValue:[self taskType] forKey:@"taskType"];
    }
    if([self tcpOption])
    {
        [result setValue:[[self tcpOption] dictionary]forKey:@"tcpOption"];
    }
    if([self udpOption])
    {
        [result setValue:[[self udpOption] dictionary]forKey:@"udpOption"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.address = [dictionary objectForKey:@"address"];
    self.advanceChecked = [dictionary objectForKey:@"advanceChecked"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.cycle = [dictionary objectForKey:@"cycle"];
    self.defaultSource = [dictionary objectForKey:@"defaultSource"];
    self.dnsOption = [[SiteMonitorDnsOption alloc]initWithDic:[dictionary objectForKey:@"dnsOption"]];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.ftpOption = [[SiteMonitorFtpOption alloc]initWithDic:[dictionary objectForKey:@"ftpOption"]];
    self.hawkeyeId = [dictionary objectForKey:@"hawkeyeId"];
    self.httpOption = [[SiteMonitorHttpOption alloc]initWithDic:[dictionary objectForKey:@"httpOption"]];
    self.idValue = [dictionary objectForKey:@"id"];
    self.isDeleted = [dictionary objectForKey:@"isDeleted"];
    self.name = [dictionary objectForKey:@"name"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.pingOption = [[SiteMonitorPingOption alloc]initWithDic:[dictionary objectForKey:@"pingOption"]];
    self.pop3Option = [[SiteMonitorPop3Option alloc]initWithDic:[dictionary objectForKey:@"pop3Option"]];
    self.port = [dictionary objectForKey:@"port"];
    self.smtpOption = [[SiteMonitorSmtpOption alloc]initWithDic:[dictionary objectForKey:@"smtpOption"]];
    NSArray* sourceArray = [dictionary objectForKey:@"source"];
    if(sourceArray&&![sourceArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [sourceArray count];i++)
        {
        SiteMonitorSource* item = [[SiteMonitorSource alloc]initWithDic:[sourceArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.source = propertyArray;
    }
    self.stats = [dictionary objectForKey:@"stats"];
    self.taskType = [dictionary objectForKey:@"taskType"];
    self.tcpOption = [[SiteMonitorTcpOption alloc]initWithDic:[dictionary objectForKey:@"tcpOption"]];
    self.udpOption = [[SiteMonitorUdpOption alloc]initWithDic:[dictionary objectForKey:@"udpOption"]];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    return self;
} 

@end
@implementation DetectionGetSiteMonitorResult
-(id) initWithList:(NSArray<SiteMonitor*>*) list
        total:(NSNumber*)total { 
    self.list = list;               
    self.total = total;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self list])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self list] count]; i++) {
            SiteMonitor* item = [[self list] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"list"];
    }
    if([self total])
    {
        [result setValue:[self total] forKey:@"total"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* listArray = [dictionary objectForKey:@"list"];
    if(listArray&&![listArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [listArray count];i++)
        {
        SiteMonitor* item = [[SiteMonitor alloc]initWithDic:[listArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.list = propertyArray;
    }
    self.total = [dictionary objectForKey:@"total"];
    return self;
} 

@end
  
@implementation DetectionValidateSiteMonitorAddressResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionValidateSiteMonitorAddressResult* result = [[DetectionValidateSiteMonitorAddressResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionValidateSiteMonitorAddressResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation DetectionGetSiteMonitorRequest
-(id) initWithRegion:(NSString *)regionId
nameOrAddr:(NSString*)nameOrAddr
name:(NSString*)name
idValue:(NSArray<NSString*>*)idValue
taskType:(NSString*)taskType
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
withStats:(NSString*)withStats
withDeleted:(NSString*)withDeleted
timeInterval:(NSString*)timeInterval
filters:(NSArray<DetectionFilter*>*)filters { 
    self.regionId = regionId;
    self.nameOrAddr = nameOrAddr;
    self.name = name;
    self.idValue = idValue;
    self.taskType = taskType;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.withStats = withStats;
    self.withDeleted = withDeleted;
    self.timeInterval = timeInterval;
    self.filters = filters;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
nameOrAddr:(NSString*)nameOrAddr
name:(NSString*)name
idValue:(NSArray<NSString*>*)idValue
taskType:(NSString*)taskType
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
withStats:(NSString*)withStats
withDeleted:(NSString*)withDeleted
timeInterval:(NSString*)timeInterval
filters:(NSArray<DetectionFilter*>*)filters { 
    self.regionId = regionId;
    self.version = version;
    self.nameOrAddr = nameOrAddr;
    self.name = name;
    self.idValue = idValue;
    self.taskType = taskType;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.withStats = withStats;
    self.withDeleted = withDeleted;
    self.timeInterval = timeInterval;
    self.filters = filters;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self nameOrAddr])
    {
        [result setValue:[self nameOrAddr] forKey:@"nameOrAddr"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self taskType])
    {
        [result setValue:[self taskType] forKey:@"taskType"];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self withStats])
    {
        [result setValue:[self withStats] forKey:@"withStats"];
    }
    if([self withDeleted])
    {
        [result setValue:[self withDeleted] forKey:@"withDeleted"];
    }
    if([self timeInterval])
    {
        [result setValue:[self timeInterval] forKey:@"timeInterval"];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            DetectionFilter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.nameOrAddr = [dictionary objectForKey:@"nameOrAddr"];
    self.name = [dictionary objectForKey:@"name"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.taskType = [dictionary objectForKey:@"taskType"];
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.withStats = [dictionary objectForKey:@"withStats"];
    self.withDeleted = [dictionary objectForKey:@"withDeleted"];
    self.timeInterval = [dictionary objectForKey:@"timeInterval"];
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        DetectionFilter* item = [[DetectionFilter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    return self;
} 

@end
  
@implementation DetectionCreateSiteMonitorResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionCreateSiteMonitorResult* result = [[DetectionCreateSiteMonitorResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionCreateSiteMonitorResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation DetectionGetSiteMonitorDataPointsResult
-(id) initWithMetricData:(NSArray<StatsItem*>*) metricData
        resTime:(NSArray<StatsItem*>*)resTime
        successRatio:(NSArray<StatsItem*>*)successRatio { 
    self.metricData = metricData;               
    self.resTime = resTime;               
    self.successRatio = successRatio;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self metricData])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self metricData] count]; i++) {
            StatsItem* item = [[self metricData] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"metricData"];
    }
    if([self resTime])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self resTime] count]; i++) {
            StatsItem* item = [[self resTime] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"resTime"];
    }
    if([self successRatio])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self successRatio] count]; i++) {
            StatsItem* item = [[self successRatio] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"successRatio"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* metricDataArray = [dictionary objectForKey:@"metricData"];
    if(metricDataArray&&![metricDataArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [metricDataArray count];i++)
        {
        StatsItem* item = [[StatsItem alloc]initWithDic:[metricDataArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.metricData = propertyArray;
    }
    NSArray* resTimeArray = [dictionary objectForKey:@"resTime"];
    if(resTimeArray&&![resTimeArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resTimeArray count];i++)
        {
        StatsItem* item = [[StatsItem alloc]initWithDic:[resTimeArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.resTime = propertyArray;
    }
    NSArray* successRatioArray = [dictionary objectForKey:@"successRatio"];
    if(successRatioArray&&![successRatioArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [successRatioArray count];i++)
        {
        StatsItem* item = [[StatsItem alloc]initWithDic:[successRatioArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.successRatio = propertyArray;
    }
    return self;
} 

@end
  
@implementation DetectionGetSiteMonitorDataPointsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionGetSiteMonitorDataPointsResult* result = [[DetectionGetSiteMonitorDataPointsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionGetSiteMonitorDataPointsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation DetectionEnableSiteMonitorResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionEnableSiteMonitorResult* result = [[DetectionEnableSiteMonitorResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionEnableSiteMonitorResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation DetectionTestSiteMonitorResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionTestSiteMonitorResult* result = [[DetectionTestSiteMonitorResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionTestSiteMonitorResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation DetectionGetSiteMonitorResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionGetSiteMonitorResult* result = [[DetectionGetSiteMonitorResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionGetSiteMonitorResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation DetectionGetSiteMonitorSourceRequest
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation DetectionTestSiteMonitorRequest
-(id) initWithRegion:(NSString *)regionId
address:(NSString*)address
advanceChecked:(NSString*)advanceChecked
createdTime:(NSNumber*)createdTime
cycle:(NSNumber*)cycle
defaultSource:(NSString*)defaultSource
dnsOption:(SiteMonitorDnsOption*)dnsOption
enabled:(NSString*)enabled
ftpOption:(SiteMonitorFtpOption*)ftpOption
hawkeyeId:(NSNumber*)hawkeyeId
httpOption:(SiteMonitorHttpOption*)httpOption
idValue:(NSString*)idValue
isDeleted:(NSString*)isDeleted
name:(NSString*)name
pin:(NSString*)pin
pingOption:(SiteMonitorPingOption*)pingOption
pop3Option:(SiteMonitorPop3Option*)pop3Option
port:(NSString*)port
smtpOption:(SiteMonitorSmtpOption*)smtpOption
source:(NSArray<SiteMonitorSource*>*)source
stats:(NSMutableDictionary<NSString*,NSObject*>*)stats
taskType:(NSString*)taskType
tcpOption:(SiteMonitorTcpOption*)tcpOption
udpOption:(SiteMonitorUdpOption*)udpOption
updatedTime:(NSNumber*)updatedTime { 
    self.regionId = regionId;
    self.address = address;
    self.advanceChecked = advanceChecked;
    self.createdTime = createdTime;
    self.cycle = cycle;
    self.defaultSource = defaultSource;
    self.dnsOption = dnsOption;
    self.enabled = enabled;
    self.ftpOption = ftpOption;
    self.hawkeyeId = hawkeyeId;
    self.httpOption = httpOption;
    self.idValue = idValue;
    self.isDeleted = isDeleted;
    self.name = name;
    self.pin = pin;
    self.pingOption = pingOption;
    self.pop3Option = pop3Option;
    self.port = port;
    self.smtpOption = smtpOption;
    self.source = source;
    self.stats = stats;
    self.taskType = taskType;
    self.tcpOption = tcpOption;
    self.udpOption = udpOption;
    self.updatedTime = updatedTime;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
address:(NSString*)address
advanceChecked:(NSString*)advanceChecked
createdTime:(NSNumber*)createdTime
cycle:(NSNumber*)cycle
defaultSource:(NSString*)defaultSource
dnsOption:(SiteMonitorDnsOption*)dnsOption
enabled:(NSString*)enabled
ftpOption:(SiteMonitorFtpOption*)ftpOption
hawkeyeId:(NSNumber*)hawkeyeId
httpOption:(SiteMonitorHttpOption*)httpOption
idValue:(NSString*)idValue
isDeleted:(NSString*)isDeleted
name:(NSString*)name
pin:(NSString*)pin
pingOption:(SiteMonitorPingOption*)pingOption
pop3Option:(SiteMonitorPop3Option*)pop3Option
port:(NSString*)port
smtpOption:(SiteMonitorSmtpOption*)smtpOption
source:(NSArray<SiteMonitorSource*>*)source
stats:(NSMutableDictionary<NSString*,NSObject*>*)stats
taskType:(NSString*)taskType
tcpOption:(SiteMonitorTcpOption*)tcpOption
udpOption:(SiteMonitorUdpOption*)udpOption
updatedTime:(NSNumber*)updatedTime { 
    self.regionId = regionId;
    self.version = version;
    self.address = address;
    self.advanceChecked = advanceChecked;
    self.createdTime = createdTime;
    self.cycle = cycle;
    self.defaultSource = defaultSource;
    self.dnsOption = dnsOption;
    self.enabled = enabled;
    self.ftpOption = ftpOption;
    self.hawkeyeId = hawkeyeId;
    self.httpOption = httpOption;
    self.idValue = idValue;
    self.isDeleted = isDeleted;
    self.name = name;
    self.pin = pin;
    self.pingOption = pingOption;
    self.pop3Option = pop3Option;
    self.port = port;
    self.smtpOption = smtpOption;
    self.source = source;
    self.stats = stats;
    self.taskType = taskType;
    self.tcpOption = tcpOption;
    self.udpOption = udpOption;
    self.updatedTime = updatedTime;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self address])
    {
        [result setValue:[self address] forKey:@"address"];
    }
    if([self advanceChecked])
    {
        [result setValue:[self advanceChecked] forKey:@"advanceChecked"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self cycle])
    {
        [result setValue:[self cycle] forKey:@"cycle"];
    }
    if([self defaultSource])
    {
        [result setValue:[self defaultSource] forKey:@"defaultSource"];
    }
    if([self dnsOption])
    {
        [result setValue:[[self dnsOption] dictionary]forKey:@"dnsOption"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self ftpOption])
    {
        [result setValue:[[self ftpOption] dictionary]forKey:@"ftpOption"];
    }
    if([self hawkeyeId])
    {
        [result setValue:[self hawkeyeId] forKey:@"hawkeyeId"];
    }
    if([self httpOption])
    {
        [result setValue:[[self httpOption] dictionary]forKey:@"httpOption"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self isDeleted])
    {
        [result setValue:[self isDeleted] forKey:@"isDeleted"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self pingOption])
    {
        [result setValue:[[self pingOption] dictionary]forKey:@"pingOption"];
    }
    if([self pop3Option])
    {
        [result setValue:[[self pop3Option] dictionary]forKey:@"pop3Option"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self smtpOption])
    {
        [result setValue:[[self smtpOption] dictionary]forKey:@"smtpOption"];
    }
    if([self source])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self source] count]; i++) {
            SiteMonitorSource* item = [[self source] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"source"];
    }
    if([self stats])
    {
        [result setValue:[self stats] forKey:@"stats"];
    }
    if([self taskType])
    {
        [result setValue:[self taskType] forKey:@"taskType"];
    }
    if([self tcpOption])
    {
        [result setValue:[[self tcpOption] dictionary]forKey:@"tcpOption"];
    }
    if([self udpOption])
    {
        [result setValue:[[self udpOption] dictionary]forKey:@"udpOption"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.address = [dictionary objectForKey:@"address"];
    self.advanceChecked = [dictionary objectForKey:@"advanceChecked"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.cycle = [dictionary objectForKey:@"cycle"];
    self.defaultSource = [dictionary objectForKey:@"defaultSource"];
    self.dnsOption = [[SiteMonitorDnsOption alloc]initWithDic:[dictionary objectForKey:@"dnsOption"]];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.ftpOption = [[SiteMonitorFtpOption alloc]initWithDic:[dictionary objectForKey:@"ftpOption"]];
    self.hawkeyeId = [dictionary objectForKey:@"hawkeyeId"];
    self.httpOption = [[SiteMonitorHttpOption alloc]initWithDic:[dictionary objectForKey:@"httpOption"]];
    self.idValue = [dictionary objectForKey:@"id"];
    self.isDeleted = [dictionary objectForKey:@"isDeleted"];
    self.name = [dictionary objectForKey:@"name"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.pingOption = [[SiteMonitorPingOption alloc]initWithDic:[dictionary objectForKey:@"pingOption"]];
    self.pop3Option = [[SiteMonitorPop3Option alloc]initWithDic:[dictionary objectForKey:@"pop3Option"]];
    self.port = [dictionary objectForKey:@"port"];
    self.smtpOption = [[SiteMonitorSmtpOption alloc]initWithDic:[dictionary objectForKey:@"smtpOption"]];
    NSArray* sourceArray = [dictionary objectForKey:@"source"];
    if(sourceArray&&![sourceArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [sourceArray count];i++)
        {
        SiteMonitorSource* item = [[SiteMonitorSource alloc]initWithDic:[sourceArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.source = propertyArray;
    }
    self.stats = [dictionary objectForKey:@"stats"];
    self.taskType = [dictionary objectForKey:@"taskType"];
    self.tcpOption = [[SiteMonitorTcpOption alloc]initWithDic:[dictionary objectForKey:@"tcpOption"]];
    self.udpOption = [[SiteMonitorUdpOption alloc]initWithDic:[dictionary objectForKey:@"udpOption"]];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    return self;
} 

@end
@implementation DetectionGetSiteMonitorSourceResult
-(id) initWithAll:(NSArray<IspLocation*>*) all
        limited:(NSArray<IspLocation*>*)limited { 
    self.all = all;               
    self.limited = limited;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self all])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self all] count]; i++) {
            IspLocation* item = [[self all] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"all"];
    }
    if([self limited])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self limited] count]; i++) {
            IspLocation* item = [[self limited] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"limited"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* allArray = [dictionary objectForKey:@"all"];
    if(allArray&&![allArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [allArray count];i++)
        {
        IspLocation* item = [[IspLocation alloc]initWithDic:[allArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.all = propertyArray;
    }
    NSArray* limitedArray = [dictionary objectForKey:@"limited"];
    if(limitedArray&&![limitedArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [limitedArray count];i++)
        {
        IspLocation* item = [[IspLocation alloc]initWithDic:[limitedArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.limited = propertyArray;
    }
    return self;
} 

@end
  
@implementation DetectionGetSiteMonitorSourceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionGetSiteMonitorSourceResult* result = [[DetectionGetSiteMonitorSourceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionGetSiteMonitorSourceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation DetectionDeleteSiteMonitorResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionDeleteSiteMonitorResult* result = [[DetectionDeleteSiteMonitorResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionDeleteSiteMonitorResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation DetectionUpdateSiteMonitorResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionUpdateSiteMonitorResult* result = [[DetectionUpdateSiteMonitorResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionUpdateSiteMonitorResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation DetectionUpdateSiteMonitorRequest
-(id) initWithRegion:(NSString *)regionId
address:(NSString*)address
advanceChecked:(NSString*)advanceChecked
createdTime:(NSNumber*)createdTime
cycle:(NSNumber*)cycle
defaultSource:(NSString*)defaultSource
dnsOption:(SiteMonitorDnsOption*)dnsOption
enabled:(NSString*)enabled
ftpOption:(SiteMonitorFtpOption*)ftpOption
hawkeyeId:(NSNumber*)hawkeyeId
httpOption:(SiteMonitorHttpOption*)httpOption
idValue:(NSString*)idValue
isDeleted:(NSString*)isDeleted
name:(NSString*)name
pin:(NSString*)pin
pingOption:(SiteMonitorPingOption*)pingOption
pop3Option:(SiteMonitorPop3Option*)pop3Option
port:(NSString*)port
smtpOption:(SiteMonitorSmtpOption*)smtpOption
source:(NSArray<SiteMonitorSource*>*)source
stats:(NSMutableDictionary<NSString*,NSObject*>*)stats
taskType:(NSString*)taskType
tcpOption:(SiteMonitorTcpOption*)tcpOption
udpOption:(SiteMonitorUdpOption*)udpOption
updatedTime:(NSNumber*)updatedTime { 
    self.regionId = regionId;
    self.address = address;
    self.advanceChecked = advanceChecked;
    self.createdTime = createdTime;
    self.cycle = cycle;
    self.defaultSource = defaultSource;
    self.dnsOption = dnsOption;
    self.enabled = enabled;
    self.ftpOption = ftpOption;
    self.hawkeyeId = hawkeyeId;
    self.httpOption = httpOption;
    self.idValue = idValue;
    self.isDeleted = isDeleted;
    self.name = name;
    self.pin = pin;
    self.pingOption = pingOption;
    self.pop3Option = pop3Option;
    self.port = port;
    self.smtpOption = smtpOption;
    self.source = source;
    self.stats = stats;
    self.taskType = taskType;
    self.tcpOption = tcpOption;
    self.udpOption = udpOption;
    self.updatedTime = updatedTime;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
address:(NSString*)address
advanceChecked:(NSString*)advanceChecked
createdTime:(NSNumber*)createdTime
cycle:(NSNumber*)cycle
defaultSource:(NSString*)defaultSource
dnsOption:(SiteMonitorDnsOption*)dnsOption
enabled:(NSString*)enabled
ftpOption:(SiteMonitorFtpOption*)ftpOption
hawkeyeId:(NSNumber*)hawkeyeId
httpOption:(SiteMonitorHttpOption*)httpOption
idValue:(NSString*)idValue
isDeleted:(NSString*)isDeleted
name:(NSString*)name
pin:(NSString*)pin
pingOption:(SiteMonitorPingOption*)pingOption
pop3Option:(SiteMonitorPop3Option*)pop3Option
port:(NSString*)port
smtpOption:(SiteMonitorSmtpOption*)smtpOption
source:(NSArray<SiteMonitorSource*>*)source
stats:(NSMutableDictionary<NSString*,NSObject*>*)stats
taskType:(NSString*)taskType
tcpOption:(SiteMonitorTcpOption*)tcpOption
udpOption:(SiteMonitorUdpOption*)udpOption
updatedTime:(NSNumber*)updatedTime { 
    self.regionId = regionId;
    self.version = version;
    self.address = address;
    self.advanceChecked = advanceChecked;
    self.createdTime = createdTime;
    self.cycle = cycle;
    self.defaultSource = defaultSource;
    self.dnsOption = dnsOption;
    self.enabled = enabled;
    self.ftpOption = ftpOption;
    self.hawkeyeId = hawkeyeId;
    self.httpOption = httpOption;
    self.idValue = idValue;
    self.isDeleted = isDeleted;
    self.name = name;
    self.pin = pin;
    self.pingOption = pingOption;
    self.pop3Option = pop3Option;
    self.port = port;
    self.smtpOption = smtpOption;
    self.source = source;
    self.stats = stats;
    self.taskType = taskType;
    self.tcpOption = tcpOption;
    self.udpOption = udpOption;
    self.updatedTime = updatedTime;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self address])
    {
        [result setValue:[self address] forKey:@"address"];
    }
    if([self advanceChecked])
    {
        [result setValue:[self advanceChecked] forKey:@"advanceChecked"];
    }
    if([self createdTime])
    {
        [result setValue:[self createdTime] forKey:@"createdTime"];
    }
    if([self cycle])
    {
        [result setValue:[self cycle] forKey:@"cycle"];
    }
    if([self defaultSource])
    {
        [result setValue:[self defaultSource] forKey:@"defaultSource"];
    }
    if([self dnsOption])
    {
        [result setValue:[[self dnsOption] dictionary]forKey:@"dnsOption"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self ftpOption])
    {
        [result setValue:[[self ftpOption] dictionary]forKey:@"ftpOption"];
    }
    if([self hawkeyeId])
    {
        [result setValue:[self hawkeyeId] forKey:@"hawkeyeId"];
    }
    if([self httpOption])
    {
        [result setValue:[[self httpOption] dictionary]forKey:@"httpOption"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self isDeleted])
    {
        [result setValue:[self isDeleted] forKey:@"isDeleted"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self pingOption])
    {
        [result setValue:[[self pingOption] dictionary]forKey:@"pingOption"];
    }
    if([self pop3Option])
    {
        [result setValue:[[self pop3Option] dictionary]forKey:@"pop3Option"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self smtpOption])
    {
        [result setValue:[[self smtpOption] dictionary]forKey:@"smtpOption"];
    }
    if([self source])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self source] count]; i++) {
            SiteMonitorSource* item = [[self source] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"source"];
    }
    if([self stats])
    {
        [result setValue:[self stats] forKey:@"stats"];
    }
    if([self taskType])
    {
        [result setValue:[self taskType] forKey:@"taskType"];
    }
    if([self tcpOption])
    {
        [result setValue:[[self tcpOption] dictionary]forKey:@"tcpOption"];
    }
    if([self udpOption])
    {
        [result setValue:[[self udpOption] dictionary]forKey:@"udpOption"];
    }
    if([self updatedTime])
    {
        [result setValue:[self updatedTime] forKey:@"updatedTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.address = [dictionary objectForKey:@"address"];
    self.advanceChecked = [dictionary objectForKey:@"advanceChecked"];
    self.createdTime = [dictionary objectForKey:@"createdTime"];
    self.cycle = [dictionary objectForKey:@"cycle"];
    self.defaultSource = [dictionary objectForKey:@"defaultSource"];
    self.dnsOption = [[SiteMonitorDnsOption alloc]initWithDic:[dictionary objectForKey:@"dnsOption"]];
    self.enabled = [dictionary objectForKey:@"enabled"];
    self.ftpOption = [[SiteMonitorFtpOption alloc]initWithDic:[dictionary objectForKey:@"ftpOption"]];
    self.hawkeyeId = [dictionary objectForKey:@"hawkeyeId"];
    self.httpOption = [[SiteMonitorHttpOption alloc]initWithDic:[dictionary objectForKey:@"httpOption"]];
    self.idValue = [dictionary objectForKey:@"id"];
    self.isDeleted = [dictionary objectForKey:@"isDeleted"];
    self.name = [dictionary objectForKey:@"name"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.pingOption = [[SiteMonitorPingOption alloc]initWithDic:[dictionary objectForKey:@"pingOption"]];
    self.pop3Option = [[SiteMonitorPop3Option alloc]initWithDic:[dictionary objectForKey:@"pop3Option"]];
    self.port = [dictionary objectForKey:@"port"];
    self.smtpOption = [[SiteMonitorSmtpOption alloc]initWithDic:[dictionary objectForKey:@"smtpOption"]];
    NSArray* sourceArray = [dictionary objectForKey:@"source"];
    if(sourceArray&&![sourceArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [sourceArray count];i++)
        {
        SiteMonitorSource* item = [[SiteMonitorSource alloc]initWithDic:[sourceArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.source = propertyArray;
    }
    self.stats = [dictionary objectForKey:@"stats"];
    self.taskType = [dictionary objectForKey:@"taskType"];
    self.tcpOption = [[SiteMonitorTcpOption alloc]initWithDic:[dictionary objectForKey:@"tcpOption"]];
    self.udpOption = [[SiteMonitorUdpOption alloc]initWithDic:[dictionary objectForKey:@"udpOption"]];
    self.updatedTime = [dictionary objectForKey:@"updatedTime"];
    return self;
} 

@end
@implementation DetectionEnableSiteMonitorRequest
-(id) initWithRegion:(NSString *)regionId
list:(NSArray<EnableSiteMonitorReqItem*>*)list { 
    self.regionId = regionId;
    self.list = list;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
list:(NSArray<EnableSiteMonitorReqItem*>*)list { 
    self.regionId = regionId;
    self.version = version;
    self.list = list;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self list])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self list] count]; i++) {
            EnableSiteMonitorReqItem* item = [[self list] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"list"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* listArray = [dictionary objectForKey:@"list"];
    if(listArray&&![listArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [listArray count];i++)
        {
        EnableSiteMonitorReqItem* item = [[EnableSiteMonitorReqItem alloc]initWithDic:[listArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.list = propertyArray;
    }
    return self;
} 

@end
@implementation DetectionDeleteSiteMonitorRequest
-(id) initWithRegion:(NSString *)regionId
filters:(NSArray<DetectionFilter*>*)filters { 
    self.regionId = regionId;
    self.filters = filters;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
filters:(NSArray<DetectionFilter*>*)filters { 
    self.regionId = regionId;
    self.version = version;
    self.filters = filters;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            DetectionFilter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        DetectionFilter* item = [[DetectionFilter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    return self;
} 

@end
@implementation DetectionDescribeProbeTasksResult
-(id) initWithNumberPages:(NSNumber*) numberPages
        numberRecords:(NSNumber*)numberRecords
        pageNumber:(NSNumber*)pageNumber
        pageSize:(NSNumber*)pageSize
        taskInfo:(NSArray<TaskInfo*>*)taskInfo
        totalCount:(NSNumber*)totalCount { 
    self.numberPages = numberPages;               
    self.numberRecords = numberRecords;               
    self.pageNumber = pageNumber;               
    self.pageSize = pageSize;               
    self.taskInfo = taskInfo;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self numberPages])
    {
        [result setValue:[self numberPages] forKey:@"numberPages"];
    }
    if([self numberRecords])
    {
        [result setValue:[self numberRecords] forKey:@"numberRecords"];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self taskInfo])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self taskInfo] count]; i++) {
            TaskInfo* item = [[self taskInfo] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"taskInfo"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.numberPages = [dictionary objectForKey:@"numberPages"];
    self.numberRecords = [dictionary objectForKey:@"numberRecords"];
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    NSArray* taskInfoArray = [dictionary objectForKey:@"taskInfo"];
    if(taskInfoArray&&![taskInfoArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [taskInfoArray count];i++)
        {
        TaskInfo* item = [[TaskInfo alloc]initWithDic:[taskInfoArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.taskInfo = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
@implementation DetectionDescribeMetricDataAmResult
-(id) initWithMetricDatas:(NSArray<MetricData*>*) metricDatas { 
    self.metricDatas = metricDatas;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self metricDatas])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self metricDatas] count]; i++) {
            MetricData* item = [[self metricDatas] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"metricDatas"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* metricDatasArray = [dictionary objectForKey:@"metricDatas"];
    if(metricDatasArray&&![metricDatasArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [metricDatasArray count];i++)
        {
        MetricData* item = [[MetricData alloc]initWithDic:[metricDatasArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.metricDatas = propertyArray;
    }
    return self;
} 

@end
  
@implementation DetectionDescribeMetricDataAmResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionDescribeMetricDataAmResult* result = [[DetectionDescribeMetricDataAmResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionDescribeMetricDataAmResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation DetectionDescribeProbeHistoryResult
-(id) initWithEvents:(NSArray<Event*>*) events
        name:(NSString*)name
        uuid:(NSString*)uuid { 
    self.events = events;               
    self.name = name;               
    self.uuid = uuid;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self events])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self events] count]; i++) {
            Event* item = [[self events] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"events"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* eventsArray = [dictionary objectForKey:@"events"];
    if(eventsArray&&![eventsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [eventsArray count];i++)
        {
        Event* item = [[Event alloc]initWithDic:[eventsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.events = propertyArray;
    }
    self.name = [dictionary objectForKey:@"name"];
    self.uuid = [dictionary objectForKey:@"uuid"];
    return self;
} 

@end
  
@implementation DetectionDescribeProbeHistoryResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionDescribeProbeHistoryResult* result = [[DetectionDescribeProbeHistoryResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionDescribeProbeHistoryResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation DetectionProbeTaskEnableResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionProbeTaskEnableResult* result = [[DetectionProbeTaskEnableResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionProbeTaskEnableResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation DetectionDescribeAgentStatusResult
-(id) initWithItems:(NSArray<AgentStatus*>*) items { 
    self.items = items;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self items])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self items] count]; i++) {
            AgentStatus* item = [[self items] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"items"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* itemsArray = [dictionary objectForKey:@"items"];
    if(itemsArray&&![itemsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [itemsArray count];i++)
        {
        AgentStatus* item = [[AgentStatus alloc]initWithDic:[itemsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.items = propertyArray;
    }
    return self;
} 

@end
@implementation DetectionDiscribeProbesResult
-(id) initWithProbeList:(NSArray<ProbeInfo*>*) probeList { 
    self.probeList = probeList;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self probeList])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self probeList] count]; i++) {
            ProbeInfo* item = [[self probeList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"probeList"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* probeListArray = [dictionary objectForKey:@"probeList"];
    if(probeListArray&&![probeListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [probeListArray count];i++)
        {
        ProbeInfo* item = [[ProbeInfo alloc]initWithDic:[probeListArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.probeList = propertyArray;
    }
    return self;
} 

@end
  
@implementation DetectionDiscribeProbesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionDiscribeProbesResult* result = [[DetectionDiscribeProbesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionDiscribeProbesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation DetectionDeleteProbeTaskResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionDeleteProbeTaskResult* result = [[DetectionDeleteProbeTaskResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionDeleteProbeTaskResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation DetectionDescribeProbeTasksResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionDescribeProbeTasksResult* result = [[DetectionDescribeProbeTasksResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionDescribeProbeTasksResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation DetectionCreateProbeTaskRequest
-(id) initWithRegion:(NSString *)regionId
clientToken:(NSString*)clientToken
createProbeTaskSpec:(CreateProbeTaskParam*)createProbeTaskSpec { 
    self.regionId = regionId;
    self.clientToken = clientToken;
    self.createProbeTaskSpec = createProbeTaskSpec;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
clientToken:(NSString*)clientToken
createProbeTaskSpec:(CreateProbeTaskParam*)createProbeTaskSpec { 
    self.regionId = regionId;
    self.version = version;
    self.clientToken = clientToken;
    self.createProbeTaskSpec = createProbeTaskSpec;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self clientToken])
    {
        [result setValue:[self clientToken] forKey:@"clientToken"];
    }
    if([self createProbeTaskSpec])
    {
        [result setValue:[[self createProbeTaskSpec] dictionary]forKey:@"createProbeTaskSpec"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.clientToken = [dictionary objectForKey:@"clientToken"];
    self.createProbeTaskSpec = [[CreateProbeTaskParam alloc]initWithDic:[dictionary objectForKey:@"createProbeTaskSpec"]];
    return self;
} 

@end
@implementation DetectionDescribeProbeTaskResult
-(id) initWithProbes:(NSArray<Probe*>*) probes
        address:(NSString*)address
        createTime:(NSString*)createTime
        deleted:(NSNumber*)deleted
        enable:(NSNumber*)enable
        frequency:(NSNumber*)frequency
        httpBody:(NSString*)httpBody
        httpCookie:(NSArray<KeyValue*>*)httpCookie
        httpHeader:(NSArray<KeyValue*>*)httpHeader
        httpType:(NSNumber*)httpType
        name:(NSString*)name
        pin:(NSString*)pin
        port:(NSNumber*)port
        probeType:(NSNumber*)probeType
        targetId:(NSString*)targetId
        targetRegion:(NSString*)targetRegion
        taskId:(NSString*)taskId
        taskType:(NSNumber*)taskType
        timeout:(NSNumber*)timeout
        updateTime:(NSString*)updateTime { 
    self.probes = probes;               
    self.address = address;               
    self.createTime = createTime;               
    self.deleted = deleted;               
    self.enable = enable;               
    self.frequency = frequency;               
    self.httpBody = httpBody;               
    self.httpCookie = httpCookie;               
    self.httpHeader = httpHeader;               
    self.httpType = httpType;               
    self.name = name;               
    self.pin = pin;               
    self.port = port;               
    self.probeType = probeType;               
    self.targetId = targetId;               
    self.targetRegion = targetRegion;               
    self.taskId = taskId;               
    self.taskType = taskType;               
    self.timeout = timeout;               
    self.updateTime = updateTime;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self probes])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self probes] count]; i++) {
            Probe* item = [[self probes] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"probes"];
    }
    if([self address])
    {
        [result setValue:[self address] forKey:@"address"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self deleted])
    {
        [result setValue:[self deleted] forKey:@"deleted"];
    }
    if([self enable])
    {
        [result setValue:[self enable] forKey:@"enable"];
    }
    if([self frequency])
    {
        [result setValue:[self frequency] forKey:@"frequency"];
    }
    if([self httpBody])
    {
        [result setValue:[self httpBody] forKey:@"httpBody"];
    }
    if([self httpCookie])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self httpCookie] count]; i++) {
            KeyValue* item = [[self httpCookie] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"httpCookie"];
    }
    if([self httpHeader])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self httpHeader] count]; i++) {
            KeyValue* item = [[self httpHeader] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"httpHeader"];
    }
    if([self httpType])
    {
        [result setValue:[self httpType] forKey:@"httpType"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self pin])
    {
        [result setValue:[self pin] forKey:@"pin"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self probeType])
    {
        [result setValue:[self probeType] forKey:@"probeType"];
    }
    if([self targetId])
    {
        [result setValue:[self targetId] forKey:@"targetId"];
    }
    if([self targetRegion])
    {
        [result setValue:[self targetRegion] forKey:@"targetRegion"];
    }
    if([self taskId])
    {
        [result setValue:[self taskId] forKey:@"taskId"];
    }
    if([self taskType])
    {
        [result setValue:[self taskType] forKey:@"taskType"];
    }
    if([self timeout])
    {
        [result setValue:[self timeout] forKey:@"timeout"];
    }
    if([self updateTime])
    {
        [result setValue:[self updateTime] forKey:@"updateTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* probesArray = [dictionary objectForKey:@"probes"];
    if(probesArray&&![probesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [probesArray count];i++)
        {
        Probe* item = [[Probe alloc]initWithDic:[probesArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.probes = propertyArray;
    }
    self.address = [dictionary objectForKey:@"address"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.deleted = [dictionary objectForKey:@"deleted"];
    self.enable = [dictionary objectForKey:@"enable"];
    self.frequency = [dictionary objectForKey:@"frequency"];
    self.httpBody = [dictionary objectForKey:@"httpBody"];
    NSArray* httpCookieArray = [dictionary objectForKey:@"httpCookie"];
    if(httpCookieArray&&![httpCookieArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [httpCookieArray count];i++)
        {
        KeyValue* item = [[KeyValue alloc]initWithDic:[httpCookieArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.httpCookie = propertyArray;
    }
    NSArray* httpHeaderArray = [dictionary objectForKey:@"httpHeader"];
    if(httpHeaderArray&&![httpHeaderArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [httpHeaderArray count];i++)
        {
        KeyValue* item = [[KeyValue alloc]initWithDic:[httpHeaderArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.httpHeader = propertyArray;
    }
    self.httpType = [dictionary objectForKey:@"httpType"];
    self.name = [dictionary objectForKey:@"name"];
    self.pin = [dictionary objectForKey:@"pin"];
    self.port = [dictionary objectForKey:@"port"];
    self.probeType = [dictionary objectForKey:@"probeType"];
    self.targetId = [dictionary objectForKey:@"targetId"];
    self.targetRegion = [dictionary objectForKey:@"targetRegion"];
    self.taskId = [dictionary objectForKey:@"taskId"];
    self.taskType = [dictionary objectForKey:@"taskType"];
    self.timeout = [dictionary objectForKey:@"timeout"];
    self.updateTime = [dictionary objectForKey:@"updateTime"];
    return self;
} 

@end
@implementation DetectionDiscribeProbesRequest
-(id) initWithRegion:(NSString *)regionId
filters:(NSArray<DetectionFilter*>*)filters
probeTaskID:(NSString*)probeTaskID { 
    self.regionId = regionId;
    self.filters = filters;
    self.probeTaskID = probeTaskID;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
filters:(NSArray<DetectionFilter*>*)filters
probeTaskID:(NSString*)probeTaskID { 
    self.regionId = regionId;
    self.version = version;
    self.filters = filters;
    self.probeTaskID = probeTaskID;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            DetectionFilter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    if([self probeTaskID])
    {
        [result setValue:[self probeTaskID] forKey:@"probeTaskID"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        DetectionFilter* item = [[DetectionFilter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    self.probeTaskID = [dictionary objectForKey:@"probeTaskID"];
    return self;
} 

@end
  
@implementation DetectionCreateProbeTaskResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionCreateProbeTaskResult* result = [[DetectionCreateProbeTaskResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionCreateProbeTaskResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation DetectionUpdateProbeTaskResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionUpdateProbeTaskResult* result = [[DetectionUpdateProbeTaskResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionUpdateProbeTaskResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation DetectionDescribeProbeTaskResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionDescribeProbeTaskResult* result = [[DetectionDescribeProbeTaskResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionDescribeProbeTaskResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation DetectionDescribeProbeTasksRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
name:(NSString*)name
type:(NSNumber*)type
timeInterval:(NSString*)timeInterval
withStats:(NSNumber*)withStats
withDeleted:(NSNumber*)withDeleted
enabled:(NSNumber*)enabled
filters:(NSArray<DetectionFilter*>*)filters { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.name = name;
    self.type = type;
    self.timeInterval = timeInterval;
    self.withStats = withStats;
    self.withDeleted = withDeleted;
    self.enabled = enabled;
    self.filters = filters;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
name:(NSString*)name
type:(NSNumber*)type
timeInterval:(NSString*)timeInterval
withStats:(NSNumber*)withStats
withDeleted:(NSNumber*)withDeleted
enabled:(NSNumber*)enabled
filters:(NSArray<DetectionFilter*>*)filters { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.name = name;
    self.type = type;
    self.timeInterval = timeInterval;
    self.withStats = withStats;
    self.withDeleted = withDeleted;
    self.enabled = enabled;
    self.filters = filters;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self timeInterval])
    {
        [result setValue:[self timeInterval] forKey:@"timeInterval"];
    }
    if([self withStats])
    {
        [result setValue:[self withStats] forKey:@"withStats"];
    }
    if([self withDeleted])
    {
        [result setValue:[self withDeleted] forKey:@"withDeleted"];
    }
    if([self enabled])
    {
        [result setValue:[self enabled] forKey:@"enabled"];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            DetectionFilter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.name = [dictionary objectForKey:@"name"];
    self.type = [dictionary objectForKey:@"type"];
    self.timeInterval = [dictionary objectForKey:@"timeInterval"];
    self.withStats = [dictionary objectForKey:@"withStats"];
    self.withDeleted = [dictionary objectForKey:@"withDeleted"];
    self.enabled = [dictionary objectForKey:@"enabled"];
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        DetectionFilter* item = [[DetectionFilter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    return self;
} 

@end
  
@implementation DetectionDescribeAgentStatusResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
DetectionDescribeAgentStatusResult* result = [[DetectionDescribeAgentStatusResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(DetectionDescribeAgentStatusResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation DetectionUpdateProbeTaskRequest
-(id) initWithRegion:(NSString *)regionId
httpBody:(NSString*)httpBody
httpCookie:(NSArray<KeyValue*>*)httpCookie
httpHeader:(NSArray<KeyValue*>*)httpHeader
httpType:(NSNumber*)httpType
name:(NSString*)name
probes:(NSArray<Probe*>*)probes
probeTaskID:(NSString*)probeTaskID { 
    self.regionId = regionId;
    self.httpBody = httpBody;
    self.httpCookie = httpCookie;
    self.httpHeader = httpHeader;
    self.httpType = httpType;
    self.name = name;
    self.probes = probes;
    self.probeTaskID = probeTaskID;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
httpBody:(NSString*)httpBody
httpCookie:(NSArray<KeyValue*>*)httpCookie
httpHeader:(NSArray<KeyValue*>*)httpHeader
httpType:(NSNumber*)httpType
name:(NSString*)name
probes:(NSArray<Probe*>*)probes
probeTaskID:(NSString*)probeTaskID { 
    self.regionId = regionId;
    self.version = version;
    self.httpBody = httpBody;
    self.httpCookie = httpCookie;
    self.httpHeader = httpHeader;
    self.httpType = httpType;
    self.name = name;
    self.probes = probes;
    self.probeTaskID = probeTaskID;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self httpBody])
    {
        [result setValue:[self httpBody] forKey:@"httpBody"];
    }
    if([self httpCookie])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self httpCookie] count]; i++) {
            KeyValue* item = [[self httpCookie] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"httpCookie"];
    }
    if([self httpHeader])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self httpHeader] count]; i++) {
            KeyValue* item = [[self httpHeader] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"httpHeader"];
    }
    if([self httpType])
    {
        [result setValue:[self httpType] forKey:@"httpType"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self probes])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self probes] count]; i++) {
            Probe* item = [[self probes] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"probes"];
    }
    if([self probeTaskID])
    {
        [result setValue:[self probeTaskID] forKey:@"probeTaskID"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.httpBody = [dictionary objectForKey:@"httpBody"];
    NSArray* httpCookieArray = [dictionary objectForKey:@"httpCookie"];
    if(httpCookieArray&&![httpCookieArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [httpCookieArray count];i++)
        {
        KeyValue* item = [[KeyValue alloc]initWithDic:[httpCookieArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.httpCookie = propertyArray;
    }
    NSArray* httpHeaderArray = [dictionary objectForKey:@"httpHeader"];
    if(httpHeaderArray&&![httpHeaderArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [httpHeaderArray count];i++)
        {
        KeyValue* item = [[KeyValue alloc]initWithDic:[httpHeaderArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.httpHeader = propertyArray;
    }
    self.httpType = [dictionary objectForKey:@"httpType"];
    self.name = [dictionary objectForKey:@"name"];
    NSArray* probesArray = [dictionary objectForKey:@"probes"];
    if(probesArray&&![probesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [probesArray count];i++)
        {
        Probe* item = [[Probe alloc]initWithDic:[probesArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.probes = propertyArray;
    }
    self.probeTaskID = [dictionary objectForKey:@"probeTaskID"];
    return self;
} 

@end
@implementation DetectionDescribeAgentStatusRequest
-(id) initWithRegion:(NSString *)regionId
filters:(NSArray<DetectionFilter*>*)filters { 
    self.regionId = regionId;
    self.filters = filters;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
filters:(NSArray<DetectionFilter*>*)filters { 
    self.regionId = regionId;
    self.version = version;
    self.filters = filters;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            DetectionFilter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        DetectionFilter* item = [[DetectionFilter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    return self;
} 

@end
 
